<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        // const date = new Date();
        // console.log(date);
        // console.log(date * 1); //返回时间戳 毫秒
        // console.log(typeof date);

        // const hd = Date();
        // console.log(hd);
        // console.log(typeof hd);

        // const date = Date.now();
        // console.log(date);
        //脚本时间计算
        // const start = Date.now();

        // const end = Date.now();

        // console.time('for');
        // for (let i = 0; i < 200000000; i++) { }
        // console.timeEnd("for");

        // const date = new Date("1999-02-28 5:33:55");
        // console.log(date);
        // console.log(date.getMonth() + 1);

        // const date = new Date(1999, 11, 28, 13, 55, 23);
        // console.log(date)

        const param = [1999, 11, 28, 13, 55, 23];
        const date = new Date(...param);
        console.log(date);

    </script>
</body>

</html>